<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActionController::AbstractRequest</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActionController::AbstractRequest</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/rails/actionpack/lib/action_controller/request_rb.html">
                vendor/rails/actionpack/lib/action_controller/request.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
CgiRequest and TestRequest provide concrete implementations.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000403">accepts</a>&nbsp;&nbsp;
      <a href="#M000428">body</a>&nbsp;&nbsp;
      <a href="#M000401">content_length</a>&nbsp;&nbsp;
      <a href="#M000402">content_type</a>&nbsp;&nbsp;
      <a href="#M000429">content_type_with_parameters</a>&nbsp;&nbsp;
      <a href="#M000430">content_type_without_parameters</a>&nbsp;&nbsp;
      <a href="#M000398">delete?</a>&nbsp;&nbsp;
      <a href="#M000418">domain</a>&nbsp;&nbsp;
      <a href="#M000404">format</a>&nbsp;&nbsp;
      <a href="#M000405">format=</a>&nbsp;&nbsp;
      <a href="#M000395">get?</a>&nbsp;&nbsp;
      <a href="#M000399">head?</a>&nbsp;&nbsp;
      <a href="#M000400">headers</a>&nbsp;&nbsp;
      <a href="#M000413">host</a>&nbsp;&nbsp;
      <a href="#M000414">host_with_port</a>&nbsp;&nbsp;
      <a href="#M000394">method</a>&nbsp;&nbsp;
      <a href="#M000425">parameters</a>&nbsp;&nbsp;
      <a href="#M000422">path</a>&nbsp;&nbsp;
      <a href="#M000427">path_parameters</a>&nbsp;&nbsp;
      <a href="#M000415">port</a>&nbsp;&nbsp;
      <a href="#M000417">port_string</a>&nbsp;&nbsp;
      <a href="#M000396">post?</a>&nbsp;&nbsp;
      <a href="#M000411">protocol</a>&nbsp;&nbsp;
      <a href="#M000397">put?</a>&nbsp;&nbsp;
      <a href="#M000420">query_string</a>&nbsp;&nbsp;
      <a href="#M000424">raw_post</a>&nbsp;&nbsp;
      <a href="#M000423">relative_url_root</a>&nbsp;&nbsp;
      <a href="#M000408">remote_ip</a>&nbsp;&nbsp;
      <a href="#M000393">request_method</a>&nbsp;&nbsp;
      <a href="#M000421">request_uri</a>&nbsp;&nbsp;
      <a href="#M000409">server_software</a>&nbsp;&nbsp;
      <a href="#M000412">ssl?</a>&nbsp;&nbsp;
      <a href="#M000416">standard_port</a>&nbsp;&nbsp;
      <a href="#M000419">subdomains</a>&nbsp;&nbsp;
      <a href="#M000426">symbolized_path_parameters</a>&nbsp;&nbsp;
      <a href="#M000410">url</a>&nbsp;&nbsp;
      <a href="#M000407">xhr?</a>&nbsp;&nbsp;
      <a href="#M000406">xml_http_request?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">MULTIPART_BOUNDARY</td>
          <td>=</td>
          <td class="context-item-value">%r|\Amultipart/form-data.*boundary=\&quot;?([^\&quot;;,]+)\&quot;?|n</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">EOL</td>
          <td>=</td>
          <td class="context-item-value">&quot;\015\012&quot;</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">env</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
The hash of environment variables for this request, such as {
&#8216;RAILS_ENV&#8217; =&gt; &#8216;production&#8217; }.

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000403" class="method-detail">
        <a name="M000403"></a>

        <div class="method-heading">
          <a href="#M000403" class="method-signature">
          <span class="method-name">accepts</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the accepted MIME type for the request
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000403-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000403-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 81</span>
81:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accepts</span>
82:       <span class="ruby-ivar">@accepts</span> <span class="ruby-operator">||=</span>
83:         <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_ACCEPT'</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">empty?</span>
84:           [ <span class="ruby-identifier">content_type</span>, <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">ALL</span> ].<span class="ruby-identifier">compact</span> <span class="ruby-comment cmt"># make sure content_type being nil is not included</span>
85:         <span class="ruby-keyword kw">else</span>
86:           <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_ACCEPT'</span>])
87:         <span class="ruby-keyword kw">end</span>
88:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000428" class="method-detail">
        <a name="M000428"></a>

        <div class="method-heading">
          <a href="#M000428" class="method-signature">
          <span class="method-name">body</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The request <a href="AbstractRequest.html#M000428">body</a> is an IO input
stream.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000428-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000428-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 316</span>
316:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">body</span>
317:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000401" class="method-detail">
        <a name="M000401"></a>

        <div class="method-heading">
          <a href="#M000401" class="method-signature">
          <span class="method-name">content_length</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000401-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000401-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 68</span>
68:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_length</span>
69:       <span class="ruby-ivar">@content_length</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">env</span>[<span class="ruby-value str">'CONTENT_LENGTH'</span>].<span class="ruby-identifier">to_i</span>
70:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000402" class="method-detail">
        <a name="M000402"></a>

        <div class="method-heading">
          <a href="#M000402" class="method-signature">
          <span class="method-name">content_type</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The MIME type of the HTTP request, such as Mime::XML.
</p>
<p>
For backward compatibility, the post <a
href="AbstractRequest.html#M000404">format</a> is extracted from the
X-Post-Data-Format HTTP header if present.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000402-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000402-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 76</span>
76:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
77:       <span class="ruby-ivar">@content_type</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">content_type_without_parameters</span>)
78:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000398" class="method-detail">
        <a name="M000398"></a>

        <div class="method-heading">
          <a href="#M000398" class="method-signature">
          <span class="method-name">delete?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this a DELETE request? Equivalent to request.method == :delete
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000398-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000398-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 54</span>
54:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete?</span>
55:       <span class="ruby-identifier">request_method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:delete</span>
56:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000418" class="method-detail">
        <a name="M000418"></a>

        <div class="method-heading">
          <a href="#M000418" class="method-signature">
          <span class="method-name">domain</span><span class="method-args">(tld_length = 1)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="AbstractRequest.html#M000418">domain</a> part of a <a
href="AbstractRequest.html#M000413">host</a>, such as rubyonrails.org in
&quot;<a href="http://www.rubyonrails.org">www.rubyonrails.org</a>&quot;.
You can specify a different <tt>tld_length</tt>, such as 2 to catch
rubyonrails.co.uk in &quot;<a
href="http://www.rubyonrails.co.uk">www.rubyonrails.co.uk</a>&quot;.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000418-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000418-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 202</span>
202:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain</span>(<span class="ruby-identifier">tld_length</span> = <span class="ruby-value">1</span>)
203:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">named_host?</span>(<span class="ruby-identifier">host</span>)
204: 
205:       <span class="ruby-identifier">host</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>).<span class="ruby-identifier">last</span>(<span class="ruby-value">1</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">tld_length</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">'.'</span>)
206:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000404" class="method-detail">
        <a name="M000404"></a>

        <div class="method-heading">
          <a href="#M000404" class="method-signature">
          <span class="method-name">format</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="../Mime.html">Mime</a> type for the <a
href="AbstractRequest.html#M000404">format</a> used in the request. If
there is no <a href="AbstractRequest.html#M000404">format</a> available,
the first of the accept types will be used. Examples:
</p>
<pre>
  GET /posts/5.xml   | request.format =&gt; Mime::XML
  GET /posts/5.xhtml | request.format =&gt; Mime::HTML
  GET /posts/5       | request.format =&gt; request.accepts.first (usually Mime::HTML for browsers)
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000404-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000404-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 96</span>
96:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>
97:       <span class="ruby-ivar">@format</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">parameters</span>[<span class="ruby-identifier">:format</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">Type</span>.<span class="ruby-identifier">lookup_by_extension</span>(<span class="ruby-identifier">parameters</span>[<span class="ruby-identifier">:format</span>]) <span class="ruby-operator">:</span> <span class="ruby-identifier">accepts</span>.<span class="ruby-identifier">first</span>
98:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000405" class="method-detail">
        <a name="M000405"></a>

        <div class="method-heading">
          <a href="#M000405" class="method-signature">
          <span class="method-name">format=</span><span class="method-args">(extension)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sets the <a href="AbstractRequest.html#M000404">format</a> by string
extension, which can be used to force custom formats that are not
controlled by the extension. Example:
</p>
<pre>
  class ApplicationController &lt; ActionController::Base
    before_filter :adjust_format_for_iphone

    private
      def adjust_format_for_iphone
        request.format = :iphone if request.env[&quot;HTTP_USER_AGENT&quot;][/iPhone/]
      end
  end
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000405-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000405-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 112</span>
112:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format=</span>(<span class="ruby-identifier">extension</span>)
113:       <span class="ruby-identifier">parameters</span>[<span class="ruby-identifier">:format</span>] = <span class="ruby-identifier">extension</span>.<span class="ruby-identifier">to_s</span>
114:       <span class="ruby-identifier">format</span>
115:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000395" class="method-detail">
        <a name="M000395"></a>

        <div class="method-heading">
          <a href="#M000395" class="method-signature">
          <span class="method-name">get?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this a GET (or HEAD) request? Equivalent to request.method == :get
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000395-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000395-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 39</span>
39:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get?</span>
40:       <span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:get</span>
41:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000399" class="method-detail">
        <a name="M000399"></a>

        <div class="method-heading">
          <a href="#M000399" class="method-signature">
          <span class="method-name">head?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this a HEAD request? request.method sees HEAD as :get, so check the HTTP
<a href="AbstractRequest.html#M000394">method</a> directly.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000399-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000399-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 60</span>
60:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">head?</span>
61:       <span class="ruby-identifier">request_method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:head</span>
62:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000400" class="method-detail">
        <a name="M000400"></a>

        <div class="method-heading">
          <a href="#M000400" class="method-signature">
          <span class="method-name">headers</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000400-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000400-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 64</span>
64:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">headers</span>
65:       <span class="ruby-ivar">@env</span>
66:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000413" class="method-detail">
        <a name="M000413"></a>

        <div class="method-heading">
          <a href="#M000413" class="method-signature">
          <span class="method-name">host</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="AbstractRequest.html#M000413">host</a> for this
request, such as example.com.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000413-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000413-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 172</span>
172:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">host</span>
173:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000414" class="method-detail">
        <a name="M000414"></a>

        <div class="method-heading">
          <a href="#M000414" class="method-signature">
          <span class="method-name">host_with_port</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="AbstractRequest.html#M000413">host</a>:<a
href="AbstractRequest.html#M000415">port</a> string for this request, such
as example.com or example.com:8080.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000414-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000414-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 177</span>
177:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">host_with_port</span>
178:       <span class="ruby-ivar">@host_with_port</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">host</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">port_string</span>
179:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000394" class="method-detail">
        <a name="M000394"></a>

        <div class="method-heading">
          <a href="#M000394" class="method-signature">
          <span class="method-name">method</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The HTTP request <a href="AbstractRequest.html#M000394">method</a> as a
lowercase symbol, such as :get. Note, HEAD is returned as :get since the
two are functionally equivalent from the application&#8216;s perspective.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000394-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000394-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 34</span>
34:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method</span>
35:       <span class="ruby-identifier">request_method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:head</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">:get</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">request_method</span>
36:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000425" class="method-detail">
        <a name="M000425"></a>

        <div class="method-heading">
          <a href="#M000425" class="method-signature">
          <span class="method-name">parameters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns both GET and POST <a
href="AbstractRequest.html#M000425">parameters</a> in a single hash.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000425-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000425-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 286</span>
286:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parameters</span>
287:       <span class="ruby-ivar">@parameters</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">request_parameters</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">query_parameters</span>).<span class="ruby-identifier">update</span>(<span class="ruby-identifier">path_parameters</span>).<span class="ruby-identifier">with_indifferent_access</span>
288:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000422" class="method-detail">
        <a name="M000422"></a>

        <div class="method-heading">
          <a href="#M000422" class="method-signature">
          <span class="method-name">path</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the interpreted <a href="AbstractRequest.html#M000422">path</a> to
requested resource after all the installation directory of this application
was taken into account
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000422-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000422-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 251</span>
251:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>
252:       <span class="ruby-identifier">path</span> = (<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">request_uri</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'?'</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-value str">''</span>
253: 
254:       <span class="ruby-comment cmt"># Cut off the path to the installation directory if given</span>
255:       <span class="ruby-identifier">path</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-node">%r/^#{relative_url_root}/</span>, <span class="ruby-value str">''</span>)
256:       <span class="ruby-identifier">path</span> <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>      
257:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000427" class="method-detail">
        <a name="M000427"></a>

        <div class="method-heading">
          <a href="#M000427" class="method-signature">
          <span class="method-name">path_parameters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a hash with the <a
href="AbstractRequest.html#M000425">parameters</a> used to form the <a
href="AbstractRequest.html#M000422">path</a> of the request. Returned hash
keys are strings. See <tt><a
href="AbstractRequest.html#M000426">symbolized_path_parameters</a></tt> for
symbolized keys.
</p>
<p>
Example:
</p>
<pre>
  {'action' =&gt; 'my_action', 'controller' =&gt; 'my_controller'}
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000427-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000427-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 306</span>
306:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_parameters</span>
307:       <span class="ruby-ivar">@path_parameters</span> <span class="ruby-operator">||=</span> {}
308:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000415" class="method-detail">
        <a name="M000415"></a>

        <div class="method-heading">
          <a href="#M000415" class="method-signature">
          <span class="method-name">port</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="AbstractRequest.html#M000415">port</a> number of this
request as an integer.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000415-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000415-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 182</span>
182:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">port</span>
183:       <span class="ruby-ivar">@port_as_int</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'SERVER_PORT'</span>].<span class="ruby-identifier">to_i</span>
184:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000417" class="method-detail">
        <a name="M000417"></a>

        <div class="method-heading">
          <a href="#M000417" class="method-signature">
          <span class="method-name">port_string</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="AbstractRequest.html#M000415">port</a> suffix like
&quot;:8080&quot; if the <a href="AbstractRequest.html#M000415">port</a>
number of this request is not the default HTTP <a
href="AbstractRequest.html#M000415">port</a> 80 or HTTPS <a
href="AbstractRequest.html#M000415">port</a> 443.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000417-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000417-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 196</span>
196:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">port_string</span>
197:       (<span class="ruby-identifier">port</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">standard_port</span>) <span class="ruby-operator">?</span> <span class="ruby-value str">''</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;:#{port}&quot;</span>
198:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000396" class="method-detail">
        <a name="M000396"></a>

        <div class="method-heading">
          <a href="#M000396" class="method-signature">
          <span class="method-name">post?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this a POST request? Equivalent to request.method == :post
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000396-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000396-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 44</span>
44:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post?</span>
45:       <span class="ruby-identifier">request_method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:post</span>
46:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000411" class="method-detail">
        <a name="M000411"></a>

        <div class="method-heading">
          <a href="#M000411" class="method-signature">
          <span class="method-name">protocol</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return &#8216;https://&#8217; if this is an SSL request and
&#8216;http://&#8217; otherwise.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000411-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000411-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 162</span>
162:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">protocol</span>
163:       <span class="ruby-identifier">ssl?</span> <span class="ruby-value">? </span><span class="ruby-value str">'https://'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'http://'</span>
164:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000397" class="method-detail">
        <a name="M000397"></a>

        <div class="method-heading">
          <a href="#M000397" class="method-signature">
          <span class="method-name">put?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this a PUT request? Equivalent to request.method == :put
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000397-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000397-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 49</span>
49:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put?</span>
50:       <span class="ruby-identifier">request_method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:put</span>
51:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000420" class="method-detail">
        <a name="M000420"></a>

        <div class="method-heading">
          <a href="#M000420" class="method-signature">
          <span class="method-name">query_string</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the query string, accounting for server idiosyncracies.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000420-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000420-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 218</span>
218:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">query_string</span>
219:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REQUEST_URI'</span>]
220:         <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'?'</span>, <span class="ruby-value">2</span>)[<span class="ruby-value">1</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
221:       <span class="ruby-keyword kw">else</span>
222:         <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'QUERY_STRING'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">''</span>
223:       <span class="ruby-keyword kw">end</span>
224:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000424" class="method-detail">
        <a name="M000424"></a>

        <div class="method-heading">
          <a href="#M000424" class="method-signature">
          <span class="method-name">raw_post</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Read the request <a href="AbstractRequest.html#M000428">body</a>. This is
useful for web services that need to work with raw requests directly.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000424-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000424-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 277</span>
277:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raw_post</span>
278:       <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">env</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">'RAW_POST_DATA'</span>
279:         <span class="ruby-identifier">env</span>[<span class="ruby-value str">'RAW_POST_DATA'</span>] = <span class="ruby-identifier">body</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">content_length</span>)
280:         <span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:rewind</span>)
281:       <span class="ruby-keyword kw">end</span>
282:       <span class="ruby-identifier">env</span>[<span class="ruby-value str">'RAW_POST_DATA'</span>]
283:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000423" class="method-detail">
        <a name="M000423"></a>

        <div class="method-heading">
          <a href="#M000423" class="method-signature">
          <span class="method-name">relative_url_root</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the <a href="AbstractRequest.html#M000422">path</a> minus the web
server relative installation directory. This can be set with the
environment variable RAILS_RELATIVE_URL_ROOT. It can be automatically
extracted for Apache setups. If the server is not Apache, this <a
href="AbstractRequest.html#M000394">method</a> returns an empty string.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000423-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000423-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 263</span>
263:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">relative_url_root</span>
264:       <span class="ruby-ivar">@@relative_url_root</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">case</span>
265:         <span class="ruby-keyword kw">when</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">&quot;RAILS_RELATIVE_URL_ROOT&quot;</span>]
266:           <span class="ruby-ivar">@env</span>[<span class="ruby-value str">&quot;RAILS_RELATIVE_URL_ROOT&quot;</span>]
267:         <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">server_software</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'apache'</span>
268:           <span class="ruby-ivar">@env</span>[<span class="ruby-value str">&quot;SCRIPT_NAME&quot;</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\/dispatch\.(fcgi|rb|cgi)$/</span>, <span class="ruby-value str">''</span>)
269:         <span class="ruby-keyword kw">else</span>
270:           <span class="ruby-value str">''</span>
271:       <span class="ruby-keyword kw">end</span>
272:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000408" class="method-detail">
        <a name="M000408"></a>

        <div class="method-heading">
          <a href="#M000408" class="method-signature">
          <span class="method-name">remote_ip</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Determine originating IP address. REMOTE_ADDR is the standard but will fail
if the user is behind a proxy. HTTP_CLIENT_IP and/or HTTP_X_FORWARDED_FOR
are set by proxies so check for these before falling back to REMOTE_ADDR.
HTTP_X_FORWARDED_FOR may be a comma- delimited list in the case of multiple
chained proxies; the first is the originating IP.
</p>
<p>
Security note: do not use if IP spoofing is a concern for your application.
Since <a href="AbstractRequest.html#M000408">remote_ip</a> checks HTTP <a
href="AbstractRequest.html#M000400">headers</a> for addresses forwarded by
proxies, the client may send any IP. remote_addr can&#8216;t be spoofed but
also doesn&#8216;t work behind a proxy, since it&#8216;s always the
proxy&#8216;s IP.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000408-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000408-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 136</span>
136:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote_ip</span>
137:       <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_CLIENT_IP'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">'HTTP_CLIENT_IP'</span>
138: 
139:       <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">'HTTP_X_FORWARDED_FOR'</span> <span class="ruby-keyword kw">then</span>
140:         <span class="ruby-identifier">remote_ips</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_X_FORWARDED_FOR'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">','</span>).<span class="ruby-identifier">reject</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ip</span><span class="ruby-operator">|</span>
141:           <span class="ruby-identifier">ip</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^unknown$|^(10|172\.(1[6-9]|2[0-9]|30|31)|192\.168)\./i</span>
142:         <span class="ruby-keyword kw">end</span>
143: 
144:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">remote_ips</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">strip</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">remote_ips</span>.<span class="ruby-identifier">empty?</span>
145:       <span class="ruby-keyword kw">end</span>
146: 
147:       <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REMOTE_ADDR'</span>]
148:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000393" class="method-detail">
        <a name="M000393"></a>

        <div class="method-heading">
          <a href="#M000393" class="method-signature">
          <span class="method-name">request_method</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The true HTTP request <a href="AbstractRequest.html#M000394">method</a> as
a lowercase symbol, such as :get. UnknownHttpMethod is raised for invalid
methods not listed in ACCEPTED_HTTP_METHODS.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000393-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000393-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 20</span>
20:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_method</span>
21:       <span class="ruby-ivar">@request_method</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
22:         <span class="ruby-identifier">method</span> = ((<span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REQUEST_METHOD'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'POST'</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">parameters</span>[<span class="ruby-identifier">:_method</span>].<span class="ruby-identifier">blank?</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">parameters</span>[<span class="ruby-identifier">:_method</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REQUEST_METHOD'</span>]).<span class="ruby-identifier">downcase</span>
23:         <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ACCEPTED_HTTP_METHODS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">method</span>)
24:           <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_sym</span>
25:         <span class="ruby-keyword kw">else</span>
26:           <span class="ruby-identifier">raise</span> <span class="ruby-constant">UnknownHttpMethod</span>, <span class="ruby-node">&quot;#{method}, accepted HTTP methods are #{ACCEPTED_HTTP_METHODS.to_a.to_sentence}&quot;</span>
27:         <span class="ruby-keyword kw">end</span>
28:       <span class="ruby-keyword kw">end</span>
29:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000421" class="method-detail">
        <a name="M000421"></a>

        <div class="method-heading">
          <a href="#M000421" class="method-signature">
          <span class="method-name">request_uri</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Return the request URI, accounting for server idiosyncracies. WEBrick
includes the full URL. IIS leaves REQUEST_URI blank.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000421-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000421-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 228</span>
228:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_uri</span>
229:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REQUEST_URI'</span>]
230:         <span class="ruby-comment cmt"># Remove domain, which webrick puts into the request_uri.</span>
231:         (<span class="ruby-regexp re">%r{^\w+\://[^/]+(/.*|$)$}</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">uri</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">$1</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">uri</span>
232:       <span class="ruby-keyword kw">else</span>
233:         <span class="ruby-comment cmt"># Construct IIS missing REQUEST_URI from SCRIPT_NAME and PATH_INFO.</span>
234:         <span class="ruby-identifier">script_filename</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'SCRIPT_NAME'</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">%r{[^/]+$}</span>)
235:         <span class="ruby-identifier">uri</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'PATH_INFO'</span>]
236:         <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-node">/#{script_filename}\//</span>, <span class="ruby-value str">''</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">script_filename</span>.<span class="ruby-identifier">nil?</span>
237:         <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">env_qs</span> = <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'QUERY_STRING'</span>]).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env_qs</span>.<span class="ruby-identifier">empty?</span>
238:           <span class="ruby-identifier">uri</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'?'</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">env_qs</span>
239:         <span class="ruby-keyword kw">end</span>
240: 
241:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">nil?</span>
242:           <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'REQUEST_URI'</span>)
243:           <span class="ruby-identifier">uri</span>
244:         <span class="ruby-keyword kw">else</span>
245:           <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'REQUEST_URI'</span>] = <span class="ruby-identifier">uri</span>
246:         <span class="ruby-keyword kw">end</span>
247:       <span class="ruby-keyword kw">end</span>
248:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000409" class="method-detail">
        <a name="M000409"></a>

        <div class="method-heading">
          <a href="#M000409" class="method-signature">
          <span class="method-name">server_software</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the lowercase name of the HTTP server software.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000409-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000409-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 151</span>
151:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">server_software</span>
152:       (<span class="ruby-ivar">@env</span>[<span class="ruby-value str">'SERVER_SOFTWARE'</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-regexp re">/^([a-zA-Z]+)/</span> <span class="ruby-operator">=~</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'SERVER_SOFTWARE'</span>]) <span class="ruby-operator">?</span> <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
153:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000412" class="method-detail">
        <a name="M000412"></a>

        <div class="method-heading">
          <a href="#M000412" class="method-signature">
          <span class="method-name">ssl?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Is this an SSL request?
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000412-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000412-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 167</span>
167:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ssl?</span>
168:       <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTPS'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'on'</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_X_FORWARDED_PROTO'</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'https'</span>
169:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000416" class="method-detail">
        <a name="M000416"></a>

        <div class="method-heading">
          <a href="#M000416" class="method-signature">
          <span class="method-name">standard_port</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the standard <a href="AbstractRequest.html#M000415">port</a> number
for this request&#8216;s <a
href="AbstractRequest.html#M000411">protocol</a>
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000416-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000416-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 187</span>
187:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">standard_port</span>
188:       <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">protocol</span>
189:         <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'https://'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value">443</span>
190:         <span class="ruby-keyword kw">else</span> <span class="ruby-value">80</span>
191:       <span class="ruby-keyword kw">end</span>
192:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000419" class="method-detail">
        <a name="M000419"></a>

        <div class="method-heading">
          <a href="#M000419" class="method-signature">
          <span class="method-name">subdomains</span><span class="method-args">(tld_length = 1)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns all the <a href="AbstractRequest.html#M000419">subdomains</a> as an
array, so [&quot;dev&quot;, &quot;www&quot;] would be returned for
&quot;dev.www.rubyonrails.org&quot;. You can specify a different
<tt>tld_length</tt>, such as 2 to catch [&quot;www&quot;] instead of
[&quot;www&quot;, &quot;rubyonrails&quot;] in &quot;<a
href="http://www.rubyonrails.co.uk">www.rubyonrails.co.uk</a>&quot;.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000419-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000419-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 211</span>
211:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subdomains</span>(<span class="ruby-identifier">tld_length</span> = <span class="ruby-value">1</span>)
212:       <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">named_host?</span>(<span class="ruby-identifier">host</span>)
213:       <span class="ruby-identifier">parts</span> = <span class="ruby-identifier">host</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>)
214:       <span class="ruby-identifier">parts</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span>(<span class="ruby-identifier">tld_length</span><span class="ruby-operator">+</span><span class="ruby-value">2</span>)]
215:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000426" class="method-detail">
        <a name="M000426"></a>

        <div class="method-heading">
          <a href="#M000426" class="method-signature">
          <span class="method-name">symbolized_path_parameters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The same as <tt><a
href="AbstractRequest.html#M000427">path_parameters</a></tt> with
explicitly symbolized keys
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000426-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000426-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 296</span>
296:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolized_path_parameters</span> 
297:       <span class="ruby-ivar">@symbolized_path_parameters</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">path_parameters</span>.<span class="ruby-identifier">symbolize_keys</span>
298:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000410" class="method-detail">
        <a name="M000410"></a>

        <div class="method-heading">
          <a href="#M000410" class="method-signature">
          <span class="method-name">url</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the complete URL used for this request
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000410-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000410-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 157</span>
157:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url</span>
158:       <span class="ruby-identifier">protocol</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">host_with_port</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">request_uri</span>
159:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000407" class="method-detail">
        <a name="M000407"></a>

        <div class="method-heading">
          <span class="method-name">xhr?</span><span class="method-args">()</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for xml_http_request?
</p>
        </div>
      </div>

      <div id="method-M000406" class="method-detail">
        <a name="M000406"></a>

        <div class="method-heading">
          <a href="#M000406" class="method-signature">
          <span class="method-name">xml_http_request?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns true if the request&#8216;s &quot;X-Requested-With&quot; header
contains &quot;XMLHttpRequest&quot;. (The Prototype Javascript library
sends this header with every Ajax request.)
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000406-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000406-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 120</span>
120:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_http_request?</span>
121:       <span class="ruby-operator">!</span>(<span class="ruby-ivar">@env</span>[<span class="ruby-value str">'HTTP_X_REQUESTED_WITH'</span>] <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/XMLHttpRequest/i</span>)
122:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000429" class="method-detail">
        <a name="M000429"></a>

        <div class="method-heading">
          <a href="#M000429" class="method-signature">
          <span class="method-name">content_type_with_parameters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The raw content type string. Use when you need <a
href="AbstractRequest.html#M000425">parameters</a> such as charset or
boundary which aren&#8216;t included in the <a
href="AbstractRequest.html#M000402">content_type</a> MIME type. Overridden
by the X-POST_DATA_FORMAT header for backward compatibility.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000429-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000429-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 342</span>
342:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type_with_parameters</span>
343:         <span class="ruby-identifier">content_type_from_legacy_post_data_format_header</span> <span class="ruby-operator">||</span>
344:           <span class="ruby-identifier">env</span>[<span class="ruby-value str">'CONTENT_TYPE'</span>].<span class="ruby-identifier">to_s</span>
345:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000430" class="method-detail">
        <a name="M000430"></a>

        <div class="method-heading">
          <a href="#M000430" class="method-signature">
          <span class="method-name">content_type_without_parameters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The raw content type string with its <a
href="AbstractRequest.html#M000425">parameters</a> stripped off.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000430-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000430-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_controller/request.rb, line 348</span>
348:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type_without_parameters</span>
349:         <span class="ruby-ivar">@content_type_without_parameters</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">extract_content_type_without_parameters</span>(<span class="ruby-identifier">content_type_with_parameters</span>)
350:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>